unit UnitRelMesaMesFranquia;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, RLParser, RLPDFFilter, RLFilters, RLXLSFilter, RLReport;

type
  TFormRelMesaMesFranquia = class(TForm)
    rlRelatorio: TRLReport;
    RLBand1: TRLBand;
    RLImage1: TRLImage;
    RLSystemInfo1: TRLSystemInfo;
    rlCabecalho: TRLLabel;
    RLSystemInfo2: TRLSystemInfo;
    RLXLSFilter1: TRLXLSFilter;
    RLPDFFilter1: TRLPDFFilter;
    RLExpressionParser1: TRLExpressionParser;
    RLBand5: TRLBand;
    RLDraw44: TRLDraw;
    RLDraw45: TRLDraw;
    RLDraw46: TRLDraw;
    RLDraw47: TRLDraw;
    RLDraw48: TRLDraw;
    RLDraw49: TRLDraw;
    RLDraw50: TRLDraw;
    RLDraw51: TRLDraw;
    RLDraw52: TRLDraw;
    RLDraw53: TRLDraw;
    RLDraw54: TRLDraw;
    RLDraw55: TRLDraw;
    RLDraw56: TRLDraw;
    RLDraw57: TRLDraw;
    RLDraw58: TRLDraw;
    RLDraw59: TRLDraw;
    RLLabel15: TRLLabel;
    RLDraw60: TRLDraw;
    RLLabel16: TRLLabel;
    rlMedia01: TRLDBResult;
    rlTotal01: TRLDBResult;
    rlMedia02: TRLDBResult;
    rlTotal02: TRLDBResult;
    rlMedia03: TRLDBResult;
    rlTotal03: TRLDBResult;
    rlTotal04: TRLDBResult;
    rlMedia04: TRLDBResult;
    rlMedia05: TRLDBResult;
    rlTotal05: TRLDBResult;
    rlMedia06: TRLDBResult;
    rlTotal06: TRLDBResult;
    rlMedia07: TRLDBResult;
    rlTotal07: TRLDBResult;
    rlMedia08: TRLDBResult;
    rlTotal08: TRLDBResult;
    rlMedia09: TRLDBResult;
    rlTotal09: TRLDBResult;
    rlMedia10: TRLDBResult;
    rlTotal10: TRLDBResult;
    rlMedia11: TRLDBResult;
    rlTotal11: TRLDBResult;
    rlMedia12: TRLDBResult;
    rlTotal12: TRLDBResult;
    RLDBResult56: TRLDBResult;
    RLDraw61: TRLDraw;
    rlMedia: TRLLabel;
    RLLabel18: TRLLabel;
    RLLabel19: TRLLabel;
    rlTotal: TRLLabel;
    RLDBResult8: TRLDBResult;
    RLDBResult9: TRLDBResult;
    RLDraw79: TRLDraw;
    RLDBResult10: TRLDBResult;
    RLDBResult11: TRLDBResult;
    RLDraw80: TRLDraw;
    RLDBResult12: TRLDBResult;
    RLDBResult13: TRLDBResult;
    RLDraw83: TRLDraw;
    RLDBResult14: TRLDBResult;
    RLDBResult15: TRLDBResult;
    RLDraw84: TRLDraw;
    RLDBResult16: TRLDBResult;
    RLDBResult17: TRLDBResult;
    RLDraw85: TRLDraw;
    RLDBResult18: TRLDBResult;
    RLDBResult19: TRLDBResult;
    RLDraw86: TRLDraw;
    RLDBResult20: TRLDBResult;
    RLDBResult21: TRLDBResult;
    RLDraw87: TRLDraw;
    RLBand3: TRLBand;
    RLLabel1: TRLLabel;
    RLLabel2: TRLLabel;
    RLLabel3: TRLLabel;
    RLLabel4: TRLLabel;
    RLLabel5: TRLLabel;
    RLLabel6: TRLLabel;
    RLLabel7: TRLLabel;
    RLLabel8: TRLLabel;
    RLLabel11: TRLLabel;
    RLDraw2: TRLDraw;
    RLDraw6: TRLDraw;
    RLDraw9: TRLDraw;
    RLDraw10: TRLDraw;
    RLDraw11: TRLDraw;
    RLDraw12: TRLDraw;
    RLDraw8: TRLDraw;
    RLDraw82: TRLDraw;
    RLLabel10: TRLLabel;
    RLDraw3: TRLDraw;
    RLDraw4: TRLDraw;
    RLDraw7: TRLDraw;
    RLDraw81: TRLDraw;
    RLLabel12: TRLLabel;
    RLLabel13: TRLLabel;
    RLLabel29: TRLLabel;
    RLLabel31: TRLLabel;
    RLDraw74: TRLDraw;
    RLDraw72: TRLDraw;
    RLDraw107: TRLDraw;
    RLDraw108: TRLDraw;
    RLLabel17: TRLLabel;
    RLDraw41: TRLDraw;
    RLLabel20: TRLLabel;
    RLDraw62: TRLDraw;
    RLDraw63: TRLDraw;
    RLLabel22: TRLLabel;
    RLDraw64: TRLDraw;
    RLLabel23: TRLLabel;
    RLDraw67: TRLDraw;
    RLLabel24: TRLLabel;
    RLDraw68: TRLDraw;
    RLLabel25: TRLLabel;
    RLDraw69: TRLDraw;
    RLLabel26: TRLLabel;
    RLDraw70: TRLDraw;
    RLLabel27: TRLLabel;
    RLBand2: TRLBand;
    RLDraw1: TRLDraw;
    RLDraw5: TRLDraw;
    RLDraw13: TRLDraw;
    RLDraw14: TRLDraw;
    RLDraw15: TRLDraw;
    RLDraw16: TRLDraw;
    RLDraw17: TRLDraw;
    RLDraw18: TRLDraw;
    RLDraw19: TRLDraw;
    RLDraw20: TRLDraw;
    RLDraw21: TRLDraw;
    RLDraw22: TRLDraw;
    RLDraw23: TRLDraw;
    RLDraw24: TRLDraw;
    RLDraw25: TRLDraw;
    RLDraw26: TRLDraw;
    dbLinha: TRLDBText;
    RLDBResult61: TRLDBResult;
    RLDBResult62: TRLDBResult;
    RLDBResult63: TRLDBResult;
    RLDBResult64: TRLDBResult;
    RLDBResult65: TRLDBResult;
    RLDBResult66: TRLDBResult;
    RLDBResult67: TRLDBResult;
    RLDBResult68: TRLDBResult;
    RLDBResult69: TRLDBResult;
    RLDBResult70: TRLDBResult;
    RLDBResult71: TRLDBResult;
    RLDBResult72: TRLDBResult;
    RLDBResult73: TRLDBResult;
    RLDBResult74: TRLDBResult;
    RLDraw66: TRLDraw;
    RLDBResult1: TRLDBResult;
    RLDraw71: TRLDraw;
    RLDBResult2: TRLDBResult;
    RLDBResult3: TRLDBResult;
    RLDraw73: TRLDraw;
    RLDBResult4: TRLDBResult;
    RLDraw75: TRLDraw;
    RLDBResult5: TRLDBResult;
    RLDraw76: TRLDraw;
    RLDraw77: TRLDraw;
    RLDBResult6: TRLDBResult;
    RLDraw78: TRLDraw;
    RLDBResult7: TRLDBResult;
    procedure RLBand3BeforePrint(Sender: TObject; var PrintIt: Boolean);
    procedure RLBand1BeforePrint(Sender: TObject; var PrintIt: Boolean);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  FormRelMesaMesFranquia: TFormRelMesaMesFranquia;

implementation

uses UnitOpMesaMesFranquia, DB;

{$R *.dfm}

procedure TFormRelMesaMesFranquia.RLBand3BeforePrint(Sender: TObject;
  var PrintIt: Boolean);
var i : integer;
begin
  for i := 0 to ComponentCount - 1 do
    if (Components[I] is TRLLabel) then
      if (Components[i].Tag >= 1) and (Components[i].Tag <= 19) then
      begin
        (Components[i] as TRLLabel).Caption := FormOpMesaMesFranquia.qryConsulta.Fields[Components[i].Tag].DisplayLabel;
        (Components[i] as TRLLabel).Visible := FormOpMesaMesFranquia.dxDBGrid1.Columns[Components[i].Tag].Visible;
      end;
//      else
//        (Components[i] as TRLLabel).Visible := False;

end;

procedure TFormRelMesaMesFranquia.RLBand1BeforePrint(Sender: TObject;
  var PrintIt: Boolean);
begin
  rlCabecalho.Caption := FormOpMesaMesFranquia.pncabecalho.Caption;
end;

end.
